package com.weishu.service.impl;

import com.weishu.domain.TbRoomInfo;
import com.weishu.mapper.TbRoomInfoMapper;
import com.weishu.service.ITbRoomInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liyan
 * @since 2021-07-26
 */
@Service
public class TbRoomInfoServiceImpl extends ServiceImpl<TbRoomInfoMapper, TbRoomInfo> implements ITbRoomInfoService {

    @Autowired
    private TbRoomInfoMapper roomInfoMapper;
    @Override
    public List<TbRoomInfo> select() {
        return roomInfoMapper.select();
    }

    @Override
    public boolean adds(TbRoomInfo roomInfo) {
        roomInfo.setId(UUID.randomUUID().toString());
        return roomInfoMapper.adds(roomInfo);
    }

    @Override
    public boolean addroom(TbRoomInfo room) {
        return roomInfoMapper.addroom(room);
    }
}
